﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharedLib.MessageFramework;
using SharedLib;
using SharedLib.MessageFramework.Messages;
namespace Tracy.BasicServices
{
    public class TracyMessageDispatcher:MessageDispatcher
    {

        public event EventHandler<GenericEventArgs<IAppMessage>> MessageProcessing;
        public event EventHandler<GenericEventArgs<IAppMessage>> MessageProcessed;

        protected override void OnMessageProcessing(IAppMessage msg)
        {
            MessageProcessing.InvokeEvent(this, new GenericEventArgs<IAppMessage>(msg));
        }

        protected override void OnMessageProcessed(IAppMessage msg)
        {
            MessageProcessed.InvokeEvent(this, new GenericEventArgs<IAppMessage>(msg));
        }
    }
}
